// pages/mine/mycollection/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
  collection:[
	  { img: "/images/product1.png", name:"一品轩皇家有机食用调和油有机食用调和油",people:"15454",price:78.00},
	  { img: "/images/product1.png", name: "一品轩皇家有机食用调和油有机食用调和油", people: "15454", price: 78.00 },
	  { img: "/images/product1.png", name: "一品轩皇家有机食用调和油有机食用调和油", people: "15454", price: 78.00 },
	  { img: "/images/product1.png", name: "一品轩皇家有机食用调和油有机食用调和油", people: "15454", price: 78.00 }
  ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },
cancel:function(e){
	console.log(e)
	var coll=this.data.collection
	var index=e.currentTarget.dataset.index
	 coll.splice(index, 1)  
	this.setData({
		collection: coll
	})
}
})